package cn.ydxiaoshuai.tools.vo;

import com.fasterxml.jackson.annotation.JsonInclude;
import lombok.Data;

/**
 * @author 小帅丶
 * @className EasyDLGeneralBean
 * @Description EasyDLGeneralBean
 * @Date 2020/3/12-11:20
 **/
@Data
@JsonInclude(JsonInclude.Include.NON_NULL)
public class BaldGeneralBean extends BaseBean {

    private BaldResponseBean.ResultsBean data;

    public BaldGeneralBean success(String msg, String msg_zh) {
        this.msg = msg;
        this.msg_zh = msg_zh;
        this.code = 200;
        return this;
    }

    public BaldGeneralBean success(String msg, String msg_zh, BaldResponseBean.ResultsBean data) {
        this.msg = msg;
        this.msg_zh = msg_zh;
        this.code = 200;
        this.data = data;
        return this;
    }
    public BaldGeneralBean fail(String msg, String msg_zh, Integer code) {
        this.msg = msg;
        this.msg_zh = msg_zh;
        this.code = code;
        return this;
    }
    public BaldGeneralBean error(String msg, String msg_zh) {
        this.msg = msg;
        this.msg_zh = msg_zh;
        this.code = 500;
        return this;
    }
}
